package mock;

public class GetOrderService {

	private static IDao dao;

	public IDao getDao() {
		return dao;
	}

	public void setDao(IDao dao) {
		this.dao = dao;
	}

	public String getOrderInfo(String orderNum) {
		if (dao != null && dao.exists(orderNum)) {
			Order o = dao.getOrder(orderNum);
			return o.toString();
		} else {
			return "order does not exist";
		}

	}

}
